import java.io.File;
import java.util.List;

public class Main {
   public static void main(String[] args) {
      FileSystemListener listen = new FileSystemListener("C:\\Users\\jjnguy\\Desktop", 1000);
      listen.addChangeListener(new FileSystemListener.ChangeListener() {
         @Override
         public void fileSystemChanged(List<File> changedFiles) {
            System.out.println("File system changed");
         }
      });
      Thread t = new Thread(listen);
      t.start();
   }
}
